import { c } from 'vite/dist/node/moduleRunnerTransport.d-DJ_mE5sf';

export const constantRoutes = [
    {
        path: '/login',
        component: () => import('@/views/Login/index.vue'),
        name: 'login',
        meta: {
            title: '登录',
            hidden: true
        }
    },
    {
        path: '/register',
        component: () => import('@/views/Register/index.vue'),
        name: 'register',
        meta: {
            title: '注册',
            hidden: true
        }
    },
    {
        path: "/forgetPwd",
        component: () => import('@/views/Register/components/forgetpwd.vue'),
        name: 'forgot-password',
        meta: {
            title: '忘记密码',
            hidden: true
        }
    },
    {
        path: '/',
        component: import('@/layout/index.vue'),
        name: 'layout',
        meta: {
            title: '',
            hidden: true
        },
        redirect: '/home',
        children: [
            {
                path: '/home',
                component: () => import('@/views/Home/index.vue'),
                name: 'home',
                meta: {
                    title: '主页',
                    hidden: true,
                    icon: 'House'
                }
            }
        ]
    },
    {
        path: '/production',
        component: import('@/layout/index.vue'),
        name: 'production',
        meta: {
            title: '生产管理',
            hidden: true,
            category: 'production'
        },
        redirect: '/production/project',
        children: [
            {
                path: '/production/project',
                component: () => import('@/views/Production/Project/index.vue'),
                name: 'productionProject',
                meta: {
                    title: '生产计划',
                    hidden: false,
                    category: 'production'
                },
            },
            {
                path: '/production/addProject',
                component: () => import('@/views/Production/Project/AddProject/index.vue'),
                name: 'addProductionProject',
                meta: {
                    title: '新增计划',
                    hidden: true,
                    category: 'production'
                }
            },
            {
                path: '/production/order',
                component: () => import('@/views/Production/Order/index.vue'),
                name: 'productionOrder',
                meta: {
                    title: '生产工单',
                    hidden: false,
                    category: 'production'
                }
            },
            {
                path: '/production/orderDetail',
                name: 'productionOrderDetail',
                component: () => import('@/views/Production/Order/OrderDetail/index.vue'),
                meta: {
                    title: '工单详情',
                    hidden: true,
                    category: 'production'
                }
            },
            {
                path: '/production/taskDetail',
                name: 'productionTaskDetail',
                component: () => import('@/views/Production/Order/TaskDetail/index.vue'),
                meta: {
                    title: '工艺流程',
                    hidden: true,
                    category: 'production'
                }
            }
        ]
    },
    {
        path: '/storage/store',
        name: 'store',
        component: () => import('@/layout/index.vue'),
        meta: {
            title: '仓库管理',
            hidden: false,
            category: 'storage'
        },
        redirect: '/storage/store/setting',
        children: [
            {
                path: '/storage/store/setting',
                name: 'storeSetting',
                component: () => import('@/views/Storage/Store/Store/index.vue'),
                meta: {
                    title: '仓库管理',
                    hidden: false,
                    category: 'storage'
                },
            },
            {
                path: '/storage/store/addStore',
                name: 'addStore',
                component: () => import('@/views/Storage/Store/Store/AddStore/index.vue'),
                meta: {
                    title: '新增仓库',
                    hidden: true,
                    category: 'storage'
                }
            },
            {
                path: '/storage/store/storeDetail',
                name: 'storeDetail',
                component: () => import('@/views/Storage/Store/Store/StoreDetail/index.vue'),
                meta: {
                    title: '仓库详情',
                    hidden: true,
                    category: 'storage'
                }
            },
            {
                path: '/storage/store/warehouse',
                name: 'warehouse',
                component: () => import('@/views/Storage/Store/Warehouse/index.vue'),
                meta: {
                    title: '库区管理',
                    hidden: false,
                    category: 'storage'
                },
            },
            {
                path: '/storage/store/location',
                name: 'location',
                component: () => import('@/views/Storage/Store/Location/index.vue'),
                meta: {
                    title: '库位管理',
                    hidden: false,
                    category: 'storage'
                }
            }
        ]
    },
    {
        path: '/storage/entrance',
        name: 'entrance',
        component: () => import('@/layout/index.vue'),
        meta: {
            title: '出入库管理',
            hidden: false,
            category: 'storage'
        },
        redirect: '/storage/entrance/sale',
        children: [
            {
                path: '/storage/entrance/sale',
                name: 'saleEntrance',
                component: () => import('@/views/Storage/Entrance/Sale/index.vue'),
                meta: {
                    title: '销售出库',
                    hidden: false,
                    category: 'storage'
                },
            },
            {
                path: '/storage/entrance/addSale',
                name: 'addSale',
                component: () => import('@/views/Storage/Entrance/Sale/AddSale/index.vue'),
                meta: {
                    title: '新增销售出库',
                    hidden: true,
                    category: 'storage'
                },
            },
            {
                path: '/storage/entrance/updateSale',
                name: 'updateSale',
                component: () => import('@/views/Storage/Entrance/Sale/UpdateSale/index.vue'),
                meta: {
                    title: '更新销售出库',
                    hidden: true,
                    category: 'storage'
                },
            },
            {
                path: '/storage/entrance/saleDetail',
                name: 'saleDetail',
                component: () => import('@/views/Storage/Entrance/Sale/SaleDetail/index.vue'),
                meta: {
                    title: '销售出库详情',
                    hidden: true,
                    category: 'storage'
                },
            },
            {
                path: '/storage/entrance/material',
                name: 'materialInfo',
                component: () => import('@/views/Storage/Entrance/Material/index.vue'),
                meta: {
                    title: '生产领料',
                    hidden: false,
                    category: 'storage'
                }
            },
            {
                path: '/storage/entrance/material/editMaterial',
                name: 'editMaterial',
                component: () => import('@/views/Storage/Entrance/Material/EditMaterial/index.vue'),
                meta: {
                    title: '编辑生产领料',
                    hidden: true,
                    category: 'storage'
                }
            },
            {
                path: '/storage/entrance/material/addMaterial',
                name: 'addMaterial',
                component: () => import('@/views/Storage/Entrance/Material/AddMaterial/index.vue'),
                meta: {
                    title: '新增生产领料',
                    hidden: true,
                    category: 'storage'
                }
            },
            {
                path: '/storage/entrance/material/materialDetail',
                name: 'materialDetail',
                component: () => import('@/views/Storage/Entrance/Material/materialDetail/index.vue'),
                meta: {
                    title: '生产领料详情',
                    hidden: true,
                    category: 'storage'
                }
            },
            {
                path: '/storage/entrance/supplier',
                name: 'supplier',
                component: () => import('@/views/Storage/Entrance/Supplier/index.vue'),
                meta: {
                    title: '供应商退货',
                    hidden: false,
                    category: 'storage'
                }
            },
            {
                path: '/storage/entrance/addSupplier',
                name: 'addSupplier',
                component: () => import('@/views/Storage/Entrance/Supplier/AddSupplier/index.vue'),
                meta: {
                    title: '新增供应商退货',
                    hidden: true,
                    category: 'storage'
                }
            },
            {
                path: '/storage/entrance/editSupplier',
                name: 'editSupplier',
                component: () => import('@/views/Storage/Entrance/Supplier/EditSupplier/index.vue'),
                meta: {
                    title: '编辑供应商退货',
                    hidden: true,
                    category: 'storage'
                }
            },
            {
                path: '/storage/entrance/supplierDetail',
                name: 'supplierDetail',
                component: () => import('@/views/Storage/Entrance/Supplier/SupplierDetail/index.vue'),
                meta: {
                    title: '供应商退货详情',
                    hidden: true,
                    category: 'storage'
                }
            },
            {
                path: '/storage/entrance/product',
                name: 'product',
                component: () => import('@/views/Storage/Entrance/Product/index.vue'),
                meta: {
                    title: '产品入库',
                    hidden: false,
                    category: 'storage'
                }
            },
            {
                path: '/storage/entrance/addProduct',
                name: 'addProduct',
                component: () => import('@/views/Storage/Entrance/Product/AddProduct/index.vue'),
                meta: {
                    title: '新增入库',
                    hidden: true,
                    category: 'storage'
                }
            },
            {
                path: '/storage/entrance/updateProduct',
                name: 'updateProduct',
                component: () => import('@/views/Storage/Entrance/Product/UpdateProduct/index.vue'),
                meta: {
                    title: '更新产品入库',
                    hidden: true,
                    category: 'storage'
                },
            },
            {
                path: '/storage/entrance/productDetail',
                name: 'productDetail',
                component: () => import('@/views/Storage/Entrance/Product/productDetail/index.vue'),
                meta: {
                    title: '产品入库详情',
                    hidden: true,
                    category: 'storage'
                }
            },
            {
                path: '/storage/entrance/buy',
                name: 'buy',
                component: () => import('@/views/Storage/Entrance/Buy/index.vue'),
                meta: {
                    title: '采购入库',
                    hidden: false,
                    category: 'storage'
                }
            },

            {
                path: '/storage/entrance/editBuy/:id',
                name: 'editBuy',
                component: () => import('@/views/Storage/Entrance/Buy/EditBuy/index.vue'),
                meta: {
                    title: '编辑采购入库',
                    hidden: true,
                    category: 'storage'
                }
            },
            {
                path: '/storage/entrance/buyDetail/:id',
                name: 'buyDetail',
                component: () => import('@/views/Storage/Entrance/Buy/buyDetail/index.vue'),
                meta: {
                    title: '采购入库详情',
                    hidden: true,
                    category: 'storage'
                }
            },

            {
                path: '/storage/entrance/addBuy',
                name: 'addBuy',
                component: () => import('@/views/Storage/Entrance/Buy/AddBuy/index.vue'),
                meta: {
                    title: '新增采购入库',
                    hidden: true,
                    category: 'storage'
                }
            },
            {
                path: '/storage/entrance/return',
                name: 'return',
                component: () => import('@/views/Storage/Entrance/Return/index.vue'),
                meta: {
                    title: '生产退料',
                    hidden: false,
                    category: 'storage'
                }
            },
            {
                path: '/storage/entrance/addReturn',
                name: 'addReturn',
                component: () => import('@/views/Storage/Entrance/Return/AddReturn/index.vue'),
                meta: {
                    title: '新增生产退料',
                    hidden: true,
                    category: 'storage'
                }
            },
            {
                path: '/storage/entrance/updateReturn',
                name: 'updateReturn',
                component: () => import('@/views/Storage/Entrance/Return/UpdateReturn/index.vue'),
                meta: {
                    title: '编辑生产退料',
                    hidden: true,
                    category: 'storage'
                }
            },
            {
                path: '/storage/entrance/returnDetail',
                name: 'returnDetail',
                component: () => import('@/views/Storage/Entrance/Return/returnDetail/index.vue'),
                meta: {
                    title: '生产退料详情',
                    hidden: true,
                    category: 'storage'
                }
            }
        ]
    },
    {
        path: '/storage/inventory',
        name: 'inventory',
        component: () => import('@/layout/index.vue'),
        meta: {
            title: '库存信息',
            hidden: false,
            category: 'storage'
        },
        children: [
            {
                path: '/storage/inventory/productRecord',
                name: 'productRecord',
                component: () => import('@/views/Storage/Inventory/ProductRecord/index.vue'),
                meta: {
                    title: '产品出入库记录',
                    hidden: false,
                    category: 'storage'
                }
            },
            {
                path: '/storage/inventory/materialRecord',
                name: 'materialRecord',
                component: () => import('@/views/Storage/Inventory/MaterialRecord/index.vue'),
                meta: {
                    title: '物料出入库记录',
                    hidden: false,
                    category: 'storage'
                }
            },
            {
                path: '/storage/inventory/productInventory',
                name: 'productInventory',
                component: () => import('@/views/Storage/Inventory/ProductInventory/index.vue'),
                meta: {
                    title: '产品库存',
                    hidden: false,
                    category: 'storage'
                }
            },
            {
                path: '/storage/inventory/materialInventory',
                name: 'materialInventory',
                component: () => import('@/views/Storage/Inventory/MaterialInventory/index.vue'),
                meta: {
                    title: '物料库存',
                    hidden: false,
                    category: 'storage'
                }
            }
        ]
    },
    {
        path: '/storage/other',
        name: 'other',
        component: () => import('@/layout/index.vue'),
        meta: {
            title: '装箱管理',
            hidden: false,
            category: 'storage'
        },
        redirect: '/storage/other/packing',
        children: [
            {
                path: '/storage/other/packing',
                name: 'packing',
                component: () => import('@/views/Storage/Other/Packing/index.vue'),
                meta: {
                    title: '装箱管理',
                    hidden: false,
                    category: 'storage'
                }
            },
            {
                path: '/storage/other/addPacking',
                name: 'createPacking',
                component: () => import('@/views/Storage/Other/Packing/AddPacking/index.vue'),
                meta: {
                    title: '创建装箱单',
                    hidden: true,
                    category: 'storage'
                }
            },
            {
                path: '/storage/other/executePacking',
                name: 'ExecutePacking',
                component: () => import('@/views/Storage/Other/Packing/ExecutePacking/index.vue'),
                meta: {
                    title: '执行装箱',
                    hidden: true,
                    category: 'storage'
                }
            },
            {
                path: '/storage/other/packingDetail',
                name: 'packingDetail',
                component: () => import('@/views/Storage/Other/Packing/PackingDetail/index.vue'),
                meta: {
                    title: '装箱详请',
                    hidden: true,
                    category: 'storage'
                }
            }
        ]
    },
    {
        path: '/material',
        name: 'material',
        component: import('@/layout/index.vue'),
        meta: {
            title: '物料产品',
            hidden: false,
            category: 'material'
        },
        redirect: '/material/setting',
        children: [
            {
                path: '/material/setting',
                component: () => import('@/views/Material/Setting/index.vue'),
                name: 'materialSetting',
                meta: {
                    title: '物料管理',
                    hidden: false,
                    category: 'material'
                },
            },
            {
                path: '/material/addMaterial',
                component: () => import('@/views/Material/Setting/AddMaterial/index.vue'),
                name: 'addMaterialInfo',
                meta: {
                    title: '新增物料',
                    hidden: true,
                    category: 'material'
                },
            },
            {
                path: '/material/editMaterial',
                component: () => import('@/views/Material/Setting/EditMaterial/index.vue'),
                name: 'editMaterialInfo',
                meta: {
                    title: '编辑物料',
                    hidden: true,
                    category: 'material'
                },
            },
            {
                path: '/material/materialDetail',
                component: () => import('@/views/Material/Setting/MaterialDetail/index.vue'),
                name: 'materialDetailInfo',
                meta: {
                    title: '物料详情',
                    hidden: true,
                    category: 'material'
                },
            }
        ]
    }
]
